{template 'common/header'}
<div class="main">
	<ul class="nav nav-tabs">
		<li{if $_GPC['do'] == 'manage'} class="active"{/if}><a href="{php echo $this->createWebUrl('manage');}"> 拆礼盒活动</a></li>
		<li{if $_GPC['do'] == 'post'} class="active"{/if}><a href="{php echo url('platform/reply/post',array('m'=>'stonefish_chailihe'));}"><i class="fa fa-plus"></i> 添加拆礼盒活动</a></li>
		<li{if $_GPC['do'] == 'template'} class="active"{/if}><a href="{php echo $this->createWebUrl('template');}"> 活动模板</a></li>
        <li{if $_GPC['do'] == 'templatepost' || $_GPC['do'] == ''} class="active"{/if}><a href="{php echo url('site/entry/templatepost',array('m'=>'stonefish_chailihe'));}"><i class="fa fa-plus"></i> {if $item['id']}修改{else}添加{/if}活动模板</a></li>
		<li{if $_GPC['do'] == 'tmplmsg'} class="active"{/if}><a href="{php echo $this->createWebUrl('tmplmsg');}"> 消息模板</a></li>
        <li{if $_GPC['do'] == 'tmplmsgpost'} class="active"{/if}><a href="{php echo url('site/entry/tmplmsgpost',array('m'=>'stonefish_chailihe'));}"><i class="fa fa-plus"></i> 添加消息模板</a></li>
		<li{if $_GPC['do'] == 'lihestyle'} class="active"{/if}><a href="{php echo $this->createWebUrl('lihestyle');}"> 礼盒样式</a></li>
        <li{if $_GPC['do'] == 'lihestylepost'} class="active"{/if}><a href="{php echo url('site/entry/lihestylepost',array('m'=>'stonefish_chailihe'));}"><i class="fa fa-plus"></i> 添加礼盒样式</a></li>
	</ul>
	<form action="" class="form-horizontal form" method="post" enctype="multipart/form-data">
	<input type="hidden" name="id" value="{$item['id']}">
	<input type="hidden" name="uniacid" value="{$item['uniacid']}">
    <div class="panel panel-default">
	    <div class="panel-heading">模板配置{if $item['uniacid']==0}系统内部模板不可修改{/if}</div>
	        <div class="panel-body">
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label" style="color:red">模板名称</label>
					<div class="col-sm-9">
						<input type="text" name="title" value="{if !empty($item['title'])}{$item['title']}{/if}" class="form-control">
					</div>
				</div>				
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">模板图标</label>
					<div class="col-sm-9">
						{php echo tpl_form_field_image('thumb',$item['thumb']);}
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label" >文字大小</label>
					<div class="col-sm-9">
						<div class="input-group">
					        <input type="text" name="fontsize" value="{if !empty($item['fontsize'])}{$item['fontsize']}{/if}" class="form-control">
					        <span class="input-group-addon">PX</span>					
				        </div>				
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">首页背景图</label>
					<div class="col-sm-9">
						{php echo tpl_form_field_image('bgimg',$item['bgimg']);}
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">领取礼盒背景图</label>
					<div class="col-sm-9">
						{php echo tpl_form_field_image('bgimglihe',$item['bgimglihe']);}
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">中奖背景图</label>
					<div class="col-sm-9">
						{php echo tpl_form_field_image('bgimgprize',$item['bgimgprize']);}
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">背景色</label>
					<div class="col-sm-9">
						{php echo tpl_form_field_color('bgcolor', $item['bgcolor'])}
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">文字色</label>
					<div class="col-sm-9">
						{php echo tpl_form_field_color('textcolor', $item['textcolor'])}
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">链接文字色</label>
					<div class="col-sm-9">
						{php echo tpl_form_field_color('textcolorlink', $item['textcolorlink'])}
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">按钮色</label>
					<div class="col-sm-9">
						{php echo tpl_form_field_color('buttoncolor', $item['buttoncolor'])}
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">按钮文字色</label>
					<div class="col-sm-9">
						{php echo tpl_form_field_color('buttontextcolor', $item['buttontextcolor'])}
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">进度边框色</label>
					<div class="col-sm-9">
						{php echo tpl_form_field_color('rulecolor', $item['rulecolor'])}
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">进度条色</label>
					<div class="col-sm-9">
						{php echo tpl_form_field_color('ruletextcolor', $item['ruletextcolor'])}
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">提示文字色</label>
					<div class="col-sm-9">
						{php echo tpl_form_field_color('navcolor', $item['navcolor'])}
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">重要提示文字色</label>
					<div class="col-sm-9">
						{php echo tpl_form_field_color('navtextcolor', $item['navtextcolor'])}
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">礼盒导航小圆点色</label>
					<div class="col-sm-9">
						{php echo tpl_form_field_color('navactioncolor', $item['navactioncolor'])}
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">弹出框背景色</label>
					<div class="col-sm-9">
						{php echo tpl_form_field_color('watchcolor', $item['watchcolor'])}
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">弹出框文字色</label>
					<div class="col-sm-9">
						{php echo tpl_form_field_color('watchtextcolor', $item['watchtextcolor'])}
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">兑奖框背景色</label>
					<div class="col-sm-9">
						{php echo tpl_form_field_color('awardcolor', $item['awardcolor'])}
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">兑奖框文字色</label>
					<div class="col-sm-9">
						{php echo tpl_form_field_color('awardtextcolor', $item['awardtextcolor'])}
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">兑奖框成功背景色</label>
					<div class="col-sm-9">
						{php echo tpl_form_field_color('awardscolor', $item['awardscolor'])}
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">兑奖框成功文字色</label>
					<div class="col-sm-9">
						{php echo tpl_form_field_color('awardstextcolor', $item['awardstextcolor'])}
					</div>
				</div>
	        </div>			
        </div>
		<div class="form-group">
		    <div class="col-sm-12">
			    {if $item['uniacid']}
				    <input type="hidden" name="edit" value="yes">
					<button type="submit" class="btn btn-primary col-lg-3" name="submit" value="保存模板配置">保存模板配置</button>
				{else}
				    <input type="hidden" name="fuzhi" value="yes">
					<button type="submit" class="btn btn-primary col-lg-3" name="submit" value="复制后修改">复制后修改</button>
				{/if}				
			    <input type="hidden" name="token" value="{$_W['token']}" />
		    </div>
	    </div>
    </div>
	</form>
</div>
{template 'common/footer'}